﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace AnesSystem.Controls.CommonTables.GX.DLXRMYY
{
    /// <summary>
    /// MaZuiTongYiShuCtrl.xaml 的交互逻辑
    /// </summary>
    public partial class ShouShuBingRenFangShiBiaoCtrl : CustomCommonTableCtrl
    {
        public ShouShuBingRenFangShiBiaoCtrl()
        {
            InitializeComponent();
            IniteRadioBation();
        }
        private void IniteRadioBation()
        {
            new RadioButtonHelper().ChangeRadioSatus(jk,yb,xr);
            new RadioButtonHelper().ChangeRadioSatus(pj,jz,lg);
            new RadioButtonHelper().ChangeRadioSatus(txp,txzc,txs);
            new RadioButtonHelper().ChangeRadioSatus(ztza_n,ztza_y);
            new RadioButtonHelper().ChangeRadioSatus(cy,jy,mbd);
            new RadioButtonHelper().ChangeRadioSatus(js_h,js_qj,js_wm);
            new RadioButtonHelper().ChangeRadioSatus(tt_n,tt_y);
            new RadioButtonHelper().ChangeRadioSatus(tw_gr,tw_jg,tw_zc);
            new RadioButtonHelper().ChangeRadioSatus(skyh_jc,skyh_lh);
            new RadioButtonHelper().ChangeRadioSatus(pfps_n,pfps_y);
            new RadioButtonHelper().ChangeRadioSatus(hy,bhy);
            new RadioButtonHelper().ChangeRadioSatus(pj2,jz2,lg2);
            new RadioButtonHelper().ChangeRadioSatus(lh3,yb3,jz3);
            new RadioButtonHelper().ChangeRadioSatus(lh4,yb4,jz4);
           
        }
        private void Date2_GotFocus(object sender, RoutedEventArgs e)
        {
            CusDatePickerWin cusDatePicker = new CusDatePickerWin();
            cusDatePicker.SelectedDateTime = DateTime.Now;
            cusDatePicker.ShowDialog();
            if (cusDatePicker.Result)
            {
                //rqn2.Value = cusDatePicker.SelectedDateTime.Year;
                //rqy2.Value = cusDatePicker.SelectedDateTime.Month;
                //rqr2.Value = cusDatePicker.SelectedDateTime.Day;
                //rq2.Value = cusDatePicker.SelectedDateTime.ToString(DateFormat.DATE_FORMAT_STR_YMDHM_CN);//xxxx年xx月xx日
            }
        }

        private void ssrq_GotFocus(object sender, RoutedEventArgs e)
        {
            CusDatePickerWin cusDatePicker = new CusDatePickerWin();
            cusDatePicker.SelectedDateTime = DateTime.Now;
            cusDatePicker.ShowDialog();
            if (cusDatePicker.Result)
            {
               
                ssrq.Value = cusDatePicker.SelectedDateTime;//xxxx年xx月xx日
            }
        }

        private void sqfsrq_GotFocus(object sender, RoutedEventArgs e)
        {
            CusDatePickerWin cusDatePicker = new CusDatePickerWin();
            cusDatePicker.SelectedDateTime = DateTime.Now;
            cusDatePicker.ShowDialog();
            if (cusDatePicker.Result)
            {

                sqfsrq.Value = cusDatePicker.SelectedDateTime.ToString(DateFormat.DATE_FORMAT_STR_YMDHM_CN);//xxxx年xx月xx日
            }
        }

        private void shfsrq_GotFocus(object sender, RoutedEventArgs e)
        {
            CusDatePickerWin cusDatePicker = new CusDatePickerWin();
            cusDatePicker.SelectedDateTime = DateTime.Now;
            cusDatePicker.ShowDialog();
            if (cusDatePicker.Result)
            {

                shfsrq.Value = cusDatePicker.SelectedDateTime.ToString(DateFormat.DATE_FORMAT_STR_YMDHM_CN);//xxxx年xx月xx日
            }

        }
    }
}
